package com.solution.pc.shoppingcart.dao;

import java.util.List;
import java.util.Map;

import com.solution.pc.shoppingcart.entity.ShoppingCartEntity;
import com.solution.common.dao.BaseDao;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 购物车DAO接口
 * @author lilp
 * @date 2017-10-13 20:05:27
 */
public interface ShoppingCartDao extends BaseDao<ShoppingCartEntity> {
	
	/**
	 * 保存购物车
	 * @param shoppingCartEntity
	 * @return
	 * @author lilp
	 * @date 2017-10-13 20:05:27
	 */
	public long saveShoppingCart(ShoppingCartEntity shoppingCartEntity);

	/**
	 * 分页查询购物车信息
	 * @param pageParam 分页对象
	 * @param shoppingCart 分页参数
	 * @return PageBean 分页参数及数据
	 * @author lilp
	 * @date 2017-10-13 20:05:27
	 */
	public PageBean listShoppingCartPage(PageParam pageParam, Map<String, Object> param);

	/**
	 * 更新购物车
	 * @param shoppingCartEntity
	 * @return
	 * @author lilp
	 * @date 2017-10-13 20:05:27
	 */
	public int updateShoppingCart(ShoppingCartEntity shoppingCartEntity);


	/**
	 * 删除购物车角色
	 * @param id
	 * @return
	 * @author lilp
	 * @date 2017-10-13 20:05:27
	 */
	public int deleteShoppingCartById(Long id);
	
	/**
	 * 根据购物车类型获取购物车
	 * @param param
	 * @return
	 * @author lilp
	 * @date 2017-10-13 20:05:27
	 */
	public List<ShoppingCartEntity> listShoppingCart( Map<String, Object> param);

	/**
	 * 批量删除购物车商品
	 * @param param
	 * @return
	 * @author 
	 */
	public int deleteShoppingCartProduct(Map<String, Object> param);

	/**
	 * 将匿名登录的购物车商品添加到已登录的购物车中
	 * @param param
	 * @author lilp
	 */
	public void transferShoopingcartProduct(Map<String, Object> param);

	
}
